package com.senven.payorder.controller.api;


import com.senven.common.entity.Branch;
import com.senven.common.vo.CommonResult;
import com.senven.payorder.service.IPayOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zsy
 * @since 2022-09-05
 */
@RestController
@RequestMapping("/api/payorder/payorder")
public class ApiPayOrderController {

    @Autowired
    private IPayOrderService payOrderService;

    //点击去结算后 添加商品信息到pay_order表--待支付页面
//    @PostMapping("submitOrder")
//    public Integer submitOrder(@RequestBody List<Branch> list,String uid){
//        return payOrderService.addApi(list,uid);
//    }
    //点击去结算后 页面 添加商品信息到pay_order表--待支付页面
    @PostMapping("/submitOrder")
    public CommonResult submitOrder2(Integer branchid,Integer goodsid,Integer sum){
        System.out.println(sum);
        return payOrderService.addApi2(branchid,goodsid,sum);
    }

}
